/*    */ package com.zimbra.cs.client.soap;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.DomUtil;
/*    */ import com.zimbra.common.soap.MailConstants;
/*    */ import com.zimbra.cs.client.LmcContact;
/*    */ import com.zimbra.cs.client.LmcContactAttr;
/*    */ import org.dom4j.DocumentHelper;
/*    */ import org.dom4j.Element;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class LmcGetContactsRequest
/*    */   extends LmcSoapRequest
/*    */ {
/*    */   private LmcContactAttr[] mAttrs;
/*    */   private String[] mIDList;
/*    */   
/* 33 */   public void setContacts(String[] c) { this.mIDList = c; }
/* 34 */   public void setAttrs(LmcContactAttr[] attrs) { this.mAttrs = attrs; }
/*    */   
/* 36 */   public String[] getContacts() { return this.mIDList; }
/* 37 */   public LmcContactAttr[] getAttrs() { return this.mAttrs; }
/*    */   
/*    */   protected Element getRequestXML() {
/* 40 */     Element request = DocumentHelper.createElement(MailConstants.GET_CONTACTS_REQUEST);
/*    */     
/*    */ 
/* 43 */     for (int i = 0; (this.mAttrs != null) && (i < this.mAttrs.length); i++) {
/* 44 */       addContactAttr(request, this.mAttrs[i]);
/*    */     }
/*    */     
/* 47 */     for (int i = 0; (this.mIDList != null) && (i < this.mIDList.length); i++) {
/* 48 */       Element newCN = DomUtil.add(request, "cn", "");
/* 49 */       DomUtil.addAttr(newCN, "id", this.mIDList[i]);
/*    */     }
/*    */     
/* 52 */     return request;
/*    */   }
/*    */   
/*    */   protected LmcSoapResponse parseResponseXML(Element responseXML)
/*    */     throws ServiceException, LmcSoapClientException
/*    */   {
/* 58 */     LmcGetContactsResponse response = new LmcGetContactsResponse();
/* 59 */     LmcContact[] cons = parseContactArray(responseXML);
/* 60 */     response.setContacts(cons);
/* 61 */     return response;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/client/soap/LmcGetContactsRequest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */